package org.example.resourceplatform.service;

import org.example.resourceplatform.entity.User;
import org.example.resourceplatform.dto.LoginRequest;
import org.example.resourceplatform.dto.RegisterRequest;

import java.util.Optional;

public interface UserService {


    Optional<User> login(LoginRequest loginRequest);


    User register(RegisterRequest registerRequest);


    Optional<User> findByRole(String role);

    Optional<User> findByEmail(String email);


    boolean existsByEmail(String email);


    User updateUser(User user);


    void deleteUser(Integer id);
}